<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: 包 commonsNet.io</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('namespacecommonsNet_1_1io.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle"><div class="title">包 commonsNet.io</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1CopyStreamAdapter.html">CopyStreamAdapter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">当调用CopyStreamAdapter的任何一个bytesTransfered（）方法时，CopyStreamAdapter将转发给监听器列表。  <a href="classcommonsNet_1_1io_1_1CopyStreamAdapter.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1CopyStreamListener.html">CopyStreamListener</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">CopyStreamListener类可以监听流复制操作的进度。  <a href="classcommonsNet_1_1io_1_1CopyStreamListener.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">interface &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacecommonsNet_1_1io_1_1CRLFLineReader.html">CRLFLineReader</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取以CRLF作为行结束符的一行内容  <a href="interfacecommonsNet_1_1io_1_1CRLFLineReader.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1DotTerminatedMessageReader.html">DotTerminatedMessageReader</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">DotTerminatedMessageReader是一个用于从服务器读取消息的类，这些消息以单个点后跟&lt;CR&gt;&lt;LF&gt;序列结尾  <a href="classcommonsNet_1_1io_1_1DotTerminatedMessageReader.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1DotTerminatedMessageWriter.html">DotTerminatedMessageWriter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">DotTerminatedMessageWriter是一个用于向服务器写入消息的类，这些消息以单个点后跟&lt;CR&gt;&lt;LF&gt;序列结尾  <a href="classcommonsNet_1_1io_1_1DotTerminatedMessageWriter.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1FromNetAsciiInputStream.html">FromNetAsciiInputStream</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">将NetAscii换行符转换为本地换行符  <a href="classcommonsNet_1_1io_1_1FromNetAsciiInputStream.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1FromNetAsciiOutputStream.html">FromNetAsciiOutputStream</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">将NetAscii换行符转换为本地换行符  <a href="classcommonsNet_1_1io_1_1FromNetAsciiOutputStream.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1StringReader.html">StringReader</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1ToNetAsciiInputStream.html">ToNetAsciiInputStream</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">将本地换行符转换为NetAscii换行符  <a href="classcommonsNet_1_1io_1_1ToNetAsciiInputStream.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1io_1_1ToNetAsciiOutputStream.html">ToNetAsciiOutputStream</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">将本地换行符转换为NetAscii换行符  <a href="classcommonsNet_1_1io_1_1ToNetAsciiOutputStream.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a7c3d23fa6324deab0f36a5dc3b9c1475"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecommonsNet_1_1io.html#a7c3d23fa6324deab0f36a5dc3b9c1475">closeQuietly&lt;T&gt;</a> (res: ?T) where T &lt;: Resource</td></tr>
<tr class="memdesc:a7c3d23fa6324deab0f36a5dc3b9c1475"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭对象块。  <br /></td></tr>
<tr class="separator:a7c3d23fa6324deab0f36a5dc3b9c1475"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e2376d1238cc2865e3b97762df467ef"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecommonsNet_1_1io.html#a5e2376d1238cc2865e3b97762df467ef">copyStream</a> (source: InputStream, dest: OutputStream, bufferSize: Int64, streamSize: Int64, listener: ?<a class="el" href="classcommonsNet_1_1io_1_1CopyStreamListener.html">CopyStreamListener</a>, flush: Bool): Int64</td></tr>
<tr class="memdesc:a5e2376d1238cc2865e3b97762df467ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用给定大小的复制缓冲区将InputStream的内容复制到OutputStream，并在每次写入目标后通过调用其bytesTransfered（long，int）方法通知提供的CopyStreamListener复制操作的进度。  <br /></td></tr>
<tr class="separator:a5e2376d1238cc2865e3b97762df467ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:a0ee0b005b7178cd7df23bd122e023b14"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecommonsNet_1_1io.html#a0ee0b005b7178cd7df23bd122e023b14">const LINE_SEPARATOR</a> = &quot;\r\n&quot;</td></tr>
<tr class="separator:a0ee0b005b7178cd7df23bd122e023b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2623c888ac0a541b49f6d94c105ac0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecommonsNet_1_1io.html#a6e2623c888ac0a541b49f6d94c105ac0">let NO_CONVERESION</a> : Bool = &quot;\r\n&quot; == LINE_SEPARATOR</td></tr>
<tr class="separator:a6e2623c888ac0a541b49f6d94c105ac0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a380a7cabe27ab1ae0713824a9cb2792c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecommonsNet_1_1io.html#a380a7cabe27ab1ae0713824a9cb2792c">let DEFAULT_COPY_BUFFER_SIZE</a> = 1024</td></tr>
<tr class="separator:a380a7cabe27ab1ae0713824a9cb2792c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="a7c3d23fa6324deab0f36a5dc3b9c1475" name="a7c3d23fa6324deab0f36a5dc3b9c1475"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c3d23fa6324deab0f36a5dc3b9c1475">&#9670;&#160;</a></span>closeQuietly&lt;T&gt;()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.io.closeQuietly&lt;T&gt; </td>
          <td>(</td>
          <td class="paramname"><em>res</em>:&#160;</td>
          <td class="paramtype">?T</td><td>)</td>
          <td> where T &lt;: Resource </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭对象块。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">res</td><td>要关闭的对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5e2376d1238cc2865e3b97762df467ef" name="a5e2376d1238cc2865e3b97762df467ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e2376d1238cc2865e3b97762df467ef">&#9670;&#160;</a></span>copyStream()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.io.copyStream </td>
          <td>(</td>
          <td class="paramname"><em>source</em>:&#160;</td>
          <td class="paramtype">InputStream, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>dest</em>:&#160;</td>
          <td class="paramtype">OutputStream, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>bufferSize</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>streamSize</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>listener</em>:&#160;</td>
          <td class="paramtype">?CopyStreamListener, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>flush</em>:&#160;</td>
          <td class="paramtype">Bool&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用给定大小的复制缓冲区将InputStream的内容复制到OutputStream，并在每次写入目标后通过调用其bytesTransfered（long，int）方法通知提供的CopyStreamListener复制操作的进度。 </p>
<p>如果希望通知多个侦听器，则应使用CopyStreamAdapter作为侦听器，并向CopyStreamAdapter注册其他侦听器。 </p>
<p>InputStream的内容会被读取，直到到达流的末尾，但源和目标都不会关闭。您必须在方法调用之外自己完成此操作。返回读取/写入的字节数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源InputStream。 </td></tr>
    <tr><td class="paramname">dest</td><td>目标OutputStream。 </td></tr>
    <tr><td class="paramname">bufferSize</td><td>复制期间要缓冲的字节数。零值或负值表示使用DEFAULT_COPY_BUFFER_SIZE。 </td></tr>
    <tr><td class="paramname">streamSize</td><td>正在复制的流中的字节数。 </td></tr>
    <tr><td class="paramname">listener</td><td>CopyStreamListener用于通知进度。如果此参数为空，则不尝试通知。 </td></tr>
    <tr><td class="paramname">flush</td><td>是否在每次写入后刷新输出流。这对于依赖缓冲流的交互式会话是必要的。如果不刷新，数据将保留在流缓冲区中。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>读/写字节数 </dd></dl>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="a0ee0b005b7178cd7df23bd122e023b14" name="a0ee0b005b7178cd7df23bd122e023b14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ee0b005b7178cd7df23bd122e023b14">&#9670;&#160;</a></span>const LINE_SEPARATOR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.io.const LINE_SEPARATOR = &quot;\r\n&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a380a7cabe27ab1ae0713824a9cb2792c" name="a380a7cabe27ab1ae0713824a9cb2792c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a380a7cabe27ab1ae0713824a9cb2792c">&#9670;&#160;</a></span>let DEFAULT_COPY_BUFFER_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.io.let DEFAULT_COPY_BUFFER_SIZE = 1024</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a6e2623c888ac0a541b49f6d94c105ac0" name="a6e2623c888ac0a541b49f6d94c105ac0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e2623c888ac0a541b49f6d94c105ac0">&#9670;&#160;</a></span>let NO_CONVERESION</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.io.let NO_CONVERESION : Bool = &quot;\r\n&quot; == LINE_SEPARATOR</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1io.html">io</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
